# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdenlive
pkgver=22.04.3
pkgrel=0
# s390x and riscv64 blocked by polkit -> kxmlgui
# ppc64le mlt uses 64bit long double while libgcc uses 128bit long double
arch="all !armhf !s390x !ppc64le !riscv64"
url="https://kdenlive.org"
pkgdesc="An intuitive and powerful multi-track video editor, including most recent video technologies"
license="GPL-2.0-or-later"
depends="
	ffmpeg
	frei0r-plugins
	qt5-qtquickcontrols
	"
makedepends="
	extra-cmake-modules
	kdeclarative-dev
	kdoctools-dev
	kfilemetadata-dev
	knewstuff-dev
	knotifyconfig-dev
	kxmlgui-dev
	mlt-dev
	purpose-dev
	qt5-qtbase-dev
	qt5-qtmultimedia-dev
	qt5-qtnetworkauth-dev
	qt5-qtsvg-dev
	rttr-dev
	samurai
	"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdenlive-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # Broken

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
b64c0d0e97f68a460507e4a76ec429fd9b3be3752e65c8d7361a763da994d1e9a4a23a3a9061e1da386cc4c5b513463498a4b3ed23307dca5b21398c7c2c6bb2  kdenlive-22.04.3.tar.xz
"
